/*
* @Date: 2017-11-20
* @by:   chenxiaomian
*/
$(function(){
    if(typeof FastClick == 'function'){
        FastClick.attach(document.body);
    }
    // 主轮播图
    var mySwiper = new Swiper('.company-swiper', {
        autoplay: 3000,
        pagination : '.swiper-pagination',
        loop:true,
    });
    // 活动轮播图
    var myActivity = new Swiper('.activity-swiper', {
        slidesPerView : 'auto',
        initialSlide :2,
        centeredSlides : true,
        loop:true,
    });
    // 滑块切换
    $(".adv-slider .adv-block").click(function(){
        var ckey = $(this).data("key");
        $(this).addClass('active').siblings().removeClass('active');
        $(this).parent().attr("class","adv-slider "+ckey);
    });
});